package com.example.backend.service;

import com.example.backend.entity.ProductListing;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;
import java.util.List;
import com.example.backend.DTO.listProduct;

public interface BuyerService {
    //注册
    public String register(String username, String passWordF, String passwordS, String qualificationContent, int accountType);
    
    //登录
    public String login(String accountId, String password, int accountType);
    
    //修改密码
    public String changePassword(String accountId, String oldPassword, String newPassword, int accountType);
    
    //提交资质
    public String postQualificationContent(String accountId, String qualificationContent, int accountType);

    //下单
    public String placeOrder(Map<String,String> credentials);

    //获取已上架商品列表
    public List<ProductListing> getAvailableProducts();


    //获取已下单的商品列表
    public List<listProduct> getPlacedProducts(Map<String,String> credentials);


    //确认收货
    String confirmReceipt(String transactionId,String buyerId);

    //确认付款
    String pay(String transactionId,String buyerId);

    //退货
    String returnProduct (Map<String, String> credentials);

    //取消订单
    String cancelOrder (Map<String , String> credentials);
}